Recovering Data

The information store manages versioning and auditing of editing through. In the case where this table is damaged, the following query can be used to retrieve the latest version and rebuild the versioning index.

The only data lost is the date each item was published. This query assumes the items are published and current.
 

insert into aurora_data (iscurrent,source_table,created_by,updated_by,updated,current_id,master_id,Published,publish_by,publish_set_date,status,title,staged,shop_id)
select 1,'aurora_pages',99,99,getdate(),id,id,1,99,getdate(),'Published',title,1,1 from aurora_pages where id in (
select max(id) from aurora_pages group by meta_title) AND NOT ID IN(select current_id from aurora_data where iscurrent=1 and source_table='aurora_pages') 

comments powered by Disqus